home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bbskit.zip / BBSKIT.DOC < prev    next >
Text File  |  1991-04-12  |  118KB  |  5,404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                                        BBSkit
  33.  
  34.                        A Turbo Pascal unit for the BBS author
  35.  
  36.                                Written by Steve Madsen
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                  This manual and the BBSkit units are copyright (c) 1991
  43.             by Steven Madsen.  All rights reserved.
  44.  
  45.                  Throughout this manual, references are made    to other
  46.             products:
  47.  
  48.             IBM is a registered trademark, and PC-DOS is a trademark of,
  49.             International Business Machines Corporation.
  50.             MS-DOS is a trademark of Microsoft Corporation.
  51.             Macintosh is a trademark of Apple Computer, Inc.
  52.             Borland and Turbo Pascal are registered trademarks        of
  53.             Borland International, Inc.
  54.             Touch-Tone is a registered trademark of American Telephone &
  55.             Telegraph.
  56.  
  57.                  This program is being provided to you on a trial basis.
  58.             It is being marketed under the ShareWare idea.  If  you find
  59.             this product useful, you are expected to register it    with
  60.             the author for $40 in United States funds.              This
  61.             registration fee includes a registered version of        the
  62.             software, a printed user's manual, free support from     the
  63.             author, and update notices.
  64.                  Send registration fees to:
  65.  
  66.                       Steven Madsen
  67.                       1888 Edith Marie Drive
  68.                       Beavercreek, OH   45431
  69.  
  70.                  Please specify 5.25" or 3.5" disk sizes.            All
  71.             registrations must be in the form of a check or money order,
  72.             made out to Steven Madsen.  Please allow 4 to 6 weeks    for
  73.             delivery of your order.
  74.                  Registered versions of     BBSkit include Xmodem/CRC,
  75.             Xmodem/1K and Zmodem batch protocol support              for
  76.             send/receive, lots of sample code for things such as    chat
  77.             mode, time limits, and color, and  a utility to create your
  78.             own terminal emulation templates.  The    registered version
  79.             will also clear the two second product plug at the beginning
  80.             of all products written with BBSkit.
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.                               BBSkit Manual      Page 2
  98.  
  99.  
  100.  
  101.  
  102.  
  103.             Table of Contents
  104.  
  105.             Chapter 1: Getting Started            Chapter 1: Getting Started            Chapter 1: Getting Started.............................4
  106.                BBSkit Overview........................................4
  107.                The Modem..............................................4
  108.                The Serial Connection..................................5
  109.                The Computer (and Software)............................5
  110.             Chapter 2: Programming with BBSkit            Chapter 2: Programming with BBSkit            Chapter 2: Programming with BBSkit....................7
  111.                Inheriting TBBS........................................7
  112.                Expanding TBBS.........................................7
  113.                Overriding Critical Methods............................7
  114.             Chapter 3: BBSkit Methods & Types            Chapter 3: BBSkit Methods & Types            Chapter 3: BBSkit Methods & Types.....................11
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.                               BBSkit Manual      Page 3
  159.  
  160.  
  161.  
  162.  
  163.  
  164.             Getting Started                                    Chapter 1
  165.  
  166.             BBSkit Overview
  167.  
  168.                  BBSkit was developed because    there was a lack of
  169.             software packages available for the sysop who didn't want to
  170.             run someone else's software.  It  was created with the idea
  171.             that writing a  BBS shouldn't be mostly low-level work with
  172.             the modem  and serial port, that it should be honing your
  173.             user interface to perfection.  BBSkit does its  best to take
  174.             out all the hard work, and    leave the path open for your
  175.             ideas to take form.
  176.                  BBSkit is   more than a BBS toolkit.  It has the
  177.             capability of writing complete door programs, accessible to
  178.             other, pre-written software.  The only requirement is   that
  179.             your host BBS software  also uses a FOSSIL driver.  BBSkit
  180.             can still take care of all the low-level work.
  181.                  The program was created with Turbo Pascal 6.0, and will
  182.             run on any version from 5.5 or later.  The reason?    BBSkit
  183.             makes use of the later version's implementation of  objects.
  184.             An object is like a Pascal  record                                        record                                        record, but it also includes the
  185.             code that makes use of the data, binding both code  and data
  186.             into one variable type.   By making use of objects, BBSkit
  187.             can be provided as a unit,     yet it is still completely
  188.             expandable because the whole  program is one giant object:
  189.             TBBS            TBBS            TBBS.
  190.                  (At this point, if  you are unsure what an object is,
  191.             you should consult your  manuals.  Pascal 5.5 came with an
  192.             "OOP Guide," which is exactly what you want to read to learn
  193.             all about objects.  Pascal 6.0 has included  the "OOP Guide"
  194.             in the "User's Guide," chapter four.)
  195.                  BBSkit provides a host of features:
  196.  
  197.                  *  Redirection of I/O in any of up to 16 combinations.
  198.                  *  Complete support for FOSSIL driven serial I/O.
  199.                  *  Optional inactivity timeout from keyboard or serial
  200.                     port.
  201.                  *  Optional automatic carrier checking.
  202.                  *  Control of line feeds after carriage return for
  203.                     remote users.
  204.                  *  Optional pause after each screen of text.
  205.                  *  Built-in Xmodem for file send & receive.
  206.                  *  Completely expandable TBBS object.
  207.                  *  User overrideable methods during a ComReadKey or
  208.                     ComReadKeyE.
  209.                  *  ANSI and non-ANSI terminal emulation, with 14
  210.                     templates provided.
  211.                  *  and more!
  212.  
  213.             The Modem
  214.  
  215.                  Required equipment for any computer bulletin      board
  216.             system is a modem connected to your computer.  BBSkit  is no
  217.             different.  Modems   are either internal or external.  An
  218.  
  219.                               BBSkit Manual      Page 4
  220.  
  221.  
  222.  
  223.  
  224.  
  225.             internal modem is   one that is plugged directly into the
  226.             computer through one of your computer's slots; it         is
  227.             completely hidden from view and takes up no desk space.   An
  228.             external modem is one that sits on your   desk.  It usually
  229.             has lights that let you know what the modem is doing at  any
  230.             given time.  One type of modem is not superior in any way to
  231.             another.  Both get the job    done.  Refer to your modem's
  232.             manual for instructions    on how to connect it to your
  233.             computer if it has not been done already.
  234.                  Unfortunately, there was a  time when modems were not
  235.             standardized.  BBSkit requires the use of a Hayes-compatible
  236.             modem for dialing, answering the phone, or any         other
  237.             activity that is modem related and directly supported     by
  238.             BBSkit.
  239.                  The modem must be capable of reporting the       actual
  240.             carrier signal to the computer through the DCD (data carrier
  241.             detect) line.  Some modems have  DIP switches that tell the
  242.             modem to report  DCD as high all the time.  If this is the
  243.             case, the  modem must be configured to report DCD as high
  244.             only when the modem is actually connected to         another
  245.             computer.  Refer to your manual for properly     configuring
  246.             your modem.
  247.  
  248.             The Serial Connection
  249.  
  250.                  BBSkit also requires that  your modem be connected to
  251.             your computer through a RS-232C serial port connected to any
  252.             communications port from COM1: through COM4:.   (If you have
  253.             an internal modem, refer to your manuals for   installation.
  254.             Internal modems also have the side benefit of providing    a
  255.             serial port for you, so you may skip this section.)
  256.                  An RS232C is what your computer uses to     communicate
  257.             with serial devices,   such as your modem and sometimes a
  258.             mouse.  Connecting the modem through a cable  to your serial
  259.             port allows BBSkit to drive the modem.  Generally,       any
  260.             serial port driver by an 8250 chip or a 16550 chip will   be
  261.             compatible with BBSkit.     (BBSkit does not support the
  262.             extended features of a 16550.)  As   a rule, if your modem
  263.             works with your computer, then BBSkit will work with    your
  264.             modem.
  265.                  External modems must use serial cables which        are
  266.             capable of detecting signals that the modem can report, such
  267.             as the carrier detect line.  Most serial  cables are capable
  268.             of reporting the correct signal, so this should not prove to
  269.             be a problem.
  270.  
  271.             The Computer (and Software)
  272.  
  273.                  Any IBM-compatible computer        running an 80x86
  274.             microprocessor will support BBSkit.     You also must be
  275.             running either PC-DOS or MS-DOS version  2.10 or higher, and
  276.             have Turbo Pascal version 5.5 or higher.  BBSkit is provided
  277.             as a unit for both versions 5.5   and 6.0 of Turbo Pascal.
  278.             Version 5.5 units are not compatible    with version 6.0 of
  279.  
  280.                               BBSkit Manual      Page 5
  281.  
  282.  
  283.  
  284.  
  285.  
  286.             Pascal, and vice versa, so be sure you use the  correct unit
  287.             or Pascal will give you an error when you attempt to compile
  288.             a program.  Memory requirements vary from version to version
  289.             of Pascal, and depend on the environment you  choose to work
  290.             in (integrated or  command-line).  BBSkit does not make use
  291.             of any expanded  or extended memory, and will not interfere
  292.             with any RAM disks or disk  caches installed.  Overlays are
  293.             supported by Pascal while BBSkit is in use.
  294.                  In addition to that, you will need a copy   of a FOSSIL
  295.             driver, such as Ray Gwinn's X00 or David   Nugent's BNU.  A
  296.             FOSSIL driver is what BBSkit uses to interface to       your
  297.             modem.  The FOSSIL driver takes    care of low-level serial
  298.             I/O, and provides features that a built-in interface   would
  299.             have difficulty handling.
  300.                  BBSkit is compatible with any type  of DOS disk device,
  301.             such as hard drives, 5.25" and 3.5" drives  (normal and high
  302.             density).  BBSkit also supports the      use of a printer,
  303.             connected to any port recognizable by Pascal and         the
  304.             Write(Lst, ...) command (usually LPT1:).  BBSkit        also
  305.             supports the extended  text displays of the EGA (80x43) and
  306.             the VGA (80x50), but it does not support graphics       mode
  307.             directly.  (But what's  to stop you from expanding TBBS if
  308.             you really want to write a BBS in graphics mode?)
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.                               BBSkit Manual      Page 6
  342.  
  343.  
  344.  
  345.  
  346.  
  347.             Programming with BBSkit                            Chapter 2
  348.  
  349.             Inheriting TBBS
  350.  
  351.                  The very first    thing you will want to do before
  352.             anything else in your  BBSkit enhanced programs is   inherit
  353.             the TBBS object, which is the platform for the entire BBSkit
  354.             unit.  Inheriting is  simply the process of defining a new
  355.             type            type            type, which will have all the properties of the parent type,
  356.             as well as any new qualities you may          want to add.
  357.             Inheritance is   unique to objects and object oriented
  358.             programming.  Inheriting TBBS is simple:
  359.  
  360.                  TMyBBS = object(TBBS)
  361.                  end;
  362.  
  363.                  These two lines would go under your   Type                                                       Type                                                       Type declarations
  364.             at the top of your program.  Essentially, all you  have done
  365.             here is created a new object called TMyBBS that is identical
  366.             with the  TBBS object that is provided.  Still, to expand
  367.             TBBS and write a BBS or anything else      using the BBSkit
  368.             enhancements, it is a requirement.
  369.  
  370.             Expanding TBBS
  371.  
  372.                  Left alone, TBBS can't run a BBS for you,   or become a
  373.             full featured terminal program.   TBBS simply provides the
  374.             tools to create such programs.  To make use of      BBSkit's
  375.             abilities, you have to write some code to drive   them.  The
  376.             only way to do that is to add your procedures  and functions
  377.             to the original TBBS definition by expanding the   inherited
  378.             object.  Let's say you wanted to   jump right in and start
  379.             adding to the object:
  380.  
  381.                  TMyBBS = object(TBBS)
  382.                    PROCEDURE MyProcedure;
  383.                  end;
  384.  
  385.                  This would tell Pascal that you want to add a procedure
  386.             definition (called a method) to your  object definition.  To
  387.             complete the process, you would then write a       procedure
  388.             somewhere in your code called    TMyBBS.MyProcedure                                             TMyBBS.MyProcedure                                             TMyBBS.MyProcedure.  It  is
  389.             very important that the TMyBBS header is in front of each of
  390.             your procedures or  functions so that Pascal knows where to
  391.             find the code at compile time.  This is the point where  you
  392.             really need to know the basics of objects      if you don't
  393.             already.
  394.  
  395.             Overriding Critical Methods
  396.  
  397.                  TBBS alone provides three methods that are designed to
  398.             provide a base from  which to drive BBSkit programs.  They
  399.             are:
  400.  
  401.  
  402.                               BBSkit Manual      Page 7
  403.  
  404.  
  405.  
  406.  
  407.  
  408.                  CONSTRUCTOR Init;
  409.                  PROCEDURE Run; VIRTUAL;
  410.                  DESTRUCTOR Done; VIRTUAL;
  411.  
  412.                  These three methods are described in more detail here.
  413.             Run            Run            Run is empty as provided, so it does absolutely nothing when
  414.             called directly without modification.   Init                                                    Init                                                    Init initializes the
  415.             internal emulation table for TTY emulation and opens       a
  416.             "file" to send text through DOS  instead of directly to the
  417.             screen.  It is important that you call TBBS.Init                                                   TBBS.Init                                                   TBBS.Init within your
  418.             Init            Init            Init code.  The  keyword virtual is important, however.  A
  419.             virtual method is one      that is overrideable by the
  420.             programmer.  Overrideable   means that the programmer can
  421.             actually rewrite the method without     destroying the old
  422.             version.  Instead, the new version  replaces the old one in
  423.             your newly created object.   In essence, it means that you
  424.             can call both versions, and they can do completely different
  425.             actions, but they can have the same method name.    The only
  426.             difference would be the object they reside in.     Remember,
  427.             though, that virtual methods  that have been overridden by
  428.             the programmer also must have the virtual keyword following
  429.             the method definition,  but not where the method is defined
  430.             in the code.
  431.                  Init                 Init                 Init is   a method provided for initializing your
  432.             system's variables and serial port.     Code in Init should
  433.             only be run once,    and then when the program is first
  434.             executed.  Though this method does      not have a virtual
  435.             keyword, it is overrideable by the programmer.  (It does not
  436.             need the virtual keyword    because it is a     constructor                                                            constructor                                                            constructor.
  437.             Constructors are usually used for dynamically      allocated
  438.             objects, but it is  used here for simplicity's sake and to
  439.             keep things consistent.)  A runtime  error will be generated
  440.             if you do not call TBBS.Init before   making an call to an
  441.             output routine that is part of BBSkit.
  442.                  Run                 Run                 Run is a method    that does all the work for your
  443.             program.  Here is where your BBS would      wait for calls,
  444.             accept a user login, let the user roam your system,      and
  445.             finally disconnect and recycle  for another called.  Never
  446.             should a user still be online when this method       returns
  447.             control back to the main block, unless you  really know what
  448.             you are doing.
  449.                  Done                 Done                 Done is the method that cleans up after   the BBS.  It
  450.             should close any files that were opened along  the way, shut
  451.             down the serial port, make sure there is no called online to
  452.             access DOS when the program quits, and any             other
  453.             housecleaning tasks you  set down for it.  TBBS.Done should
  454.             be the last line in your own Done method, as this will close
  455.             the "file" set up by TBBS.Init.
  456.                  Programmed like this, BBSkit is set    up to have most
  457.             main blocks of any program look something like this:
  458.  
  459.                  Var
  460.                    BBS : TMyBBS;   { create an instance of your object }
  461.  
  462.  
  463.                               BBSkit Manual      Page 8
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                  BEGIN
  470.                    BBS.Init;
  471.                    BBS.Run;
  472.                    BBS.Done;
  473.                  END.
  474.  
  475.                  Remember that the whole idea behind objects is       to
  476.             encapsulate your code and data into one data type.       Any
  477.             variables you use also  should be declared as part of your
  478.             object, and most of your BBS should be  included inside your
  479.             object, except some  minor routines that might be used from
  480.             other units you may have.
  481.                  However, also keep in mind that BBSkit is designed as a
  482.             programmer's toolkit, not as   a framework for an already
  483.             existing BBS.  You are free to design your interface      to
  484.             something that  you                            you                            you like.  Feel free to experiment!      The
  485.             possibilities are endless!
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                               BBSkit Manual      Page 9
  525.  
  526.  
  527.  
  528.  
  529.  
  530.             BBSkit Methods & Types                             Chapter 3
  531.  
  532.                  What follows is a complete, alphabetical listing of the
  533.             methods, types, procedures, and functions provided    in the
  534.             untouched TBBS  object and in the BBSkit unit.  Each will
  535.             follow a general pattern:
  536.  
  537.             FUNCTION ChWaiting : Boolean;            FUNCTION ChWaiting : Boolean;            FUNCTION ChWaiting : Boolean;1                                         1                                         1
  538.  
  539.                  ChWaiting returns a boolean value reflecting the state
  540.             of the input buffer of the current   COM port.  It returns
  541.             true if at least one character  is waiting to be processed,
  542.                                                    2                                                   2                                                   2
  543.             and False if no characters are waiting.
  544.  
  545.             Sample Program            Sample Program            Sample Program3                          3                          3
  546.  
  547.                  if (ChWaiting) then
  548.                    WriteLn('Character(s) waiting to process.')
  549.                  else
  550.                    WriteLn('No characters waiting.');
  551.  
  552.             See Also:            See Also:            See Also: Incoming.4                               4                               4
  553.  
  554.             1:            1:            1: An example of the method header, what variables       are
  555.             passed to it, and the type of the return value (if any).
  556.  
  557.             2:            2:            2:  A short description of the method.
  558.  
  559.             3:            3:            3:  A short example block of   code showing how the method
  560.             might be used in a real situation.
  561.  
  562.             4:            4:            4:  A reference to other methods that have a relation to the
  563.             current method.
  564.  
  565.                  Please note that procedures and functions that do   not
  566.             include the "TBBS." header before their name are    not                                                                not                                                                not TBBS
  567.             methods.  Rather, they are simply procedures and   functions
  568.             that were needed while developing BBSkit, but didn't really
  569.             belong inside the TBBS object.  They are still freely usable
  570.             throughout the TBBS object and any of its descendents.
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.                               BBSkit Manual      Page 10
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                Backspace
  592.  
  593.             FUNCTION Backspace(Num : Byte) : String;            FUNCTION Backspace(Num : Byte) : String;            FUNCTION Backspace(Num : Byte) : String;
  594.  
  595.                  Backspace is useful for erasing text        immediately
  596.             preceeding the cursor in a BBS-style setting, where       it
  597.             sometimes isn't possible to easily erase text with     quick
  598.             commands.  It will      return a string containing Num
  599.             combinations of #8#32#8 (backspace, space, backspace), which
  600.             is capable of erasing Num characters before the cursor.  The
  601.             cursor will also be moved back Num characters on-screen.
  602.                  Some terminals, such as IBM and compatibles, generally
  603.             allow the cursor to act  non-destructively, which means  the
  604.             cursor can backspace onto existing characters        without
  605.             overwriting them.  Other terminals, such as the   Macintosh,
  606.             make the cursor act   destructively, erasing  each character
  607.             they backspace over.  Using the backspace function   ensures
  608.             that all terminals show the same thing, regardless of    how
  609.             their system treats a backspace character.
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.                               BBSkit Manual      Page 11
  647.  
  648.  
  649.  
  650.  
  651.  
  652.                                                              CarrierLost
  653.  
  654.             FUNCTION TBBS.CarrierLost : Boolean;            FUNCTION TBBS.CarrierLost : Boolean;            FUNCTION TBBS.CarrierLost : Boolean;
  655.  
  656.                  CarrierLost keeps track of the remote    carrier status
  657.             during any wait-for-key loops.  It returns a value reporting
  658.             whether carrier was lost while your  code was waiting for a
  659.             keypress.  After returning a TRUE value, your code    should
  660.             handle  the situation accordingly.  Note that CarrierLost
  661.             only returns  TRUE if there was a remote carrier to begin
  662.             with.  CarrierLost can also be called in your   code to find
  663.             out if the remote carrier was  dropped since the last check
  664.             was made.
  665.                  CarrierLost does not   reset its internal flag until
  666.             after a Hangup call is issued.  Therefore, you   are safe to
  667.             make multiple   calls to CarrierLost after carrier was
  668.             dropped, and still get the same result.
  669.  
  670.             Sample Program            Sample Program            Sample Program
  671.  
  672.                  if (CarrierLost) then LogoutUser
  673.                  else DisplayMainMenu;
  674.  
  675.             See Also:             See Also:             See Also: SetCarrierChk, Hangup.
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.                               BBSkit Manual      Page 12
  708.  
  709.  
  710.  
  711.  
  712.  
  713.                                                                   Center
  714.  
  715.             FUNCTION Center(Strn : String) : String;            FUNCTION Center(Strn : String) : String;            FUNCTION Center(Strn : String) : String;
  716.  
  717.                  Center formats Strn to be center  justified on a normal
  718.             80 column screen, and returns the new string as the function
  719.             result.  Spaces are padded at the beginning of the string to
  720.             center it out.
  721.  
  722.             See Also:            See Also:            See Also: Left, Right, Space.
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.                               BBSkit Manual      Page 13
  769.  
  770.  
  771.  
  772.  
  773.  
  774.                                                                ChWaiting
  775.  
  776.             FUNCTION TBBS.ChWaiting : Boolean;            FUNCTION TBBS.ChWaiting : Boolean;            FUNCTION TBBS.ChWaiting : Boolean;
  777.  
  778.                  ChWaiting returns a boolean value reflecting the state
  779.             of the input buffer of the current   COM port.  It returns
  780.             true if at least one character  is waiting to be processed,
  781.             and False if no characters are waiting.
  782.  
  783.             Sample Program            Sample Program            Sample Program
  784.  
  785.                  if (ChWaiting) then
  786.                    WriteLn('Character(s) waiting to process.')
  787.                  else
  788.                    WriteLn('No characters waiting.');
  789.  
  790.             See Also:            See Also:            See Also: Incoming.
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.                               BBSkit Manual      Page 14
  830.  
  831.  
  832.  
  833.  
  834.  
  835.                                                             ClearReceive
  836.  
  837.             PROCEDURE TBBS.ClearReceive;            PROCEDURE TBBS.ClearReceive;            PROCEDURE TBBS.ClearReceive;
  838.  
  839.                  ClearReceive removes any waiting characters from    the
  840.             current COM port immediately, without processing them.
  841.  
  842.             Sample Program            Sample Program            Sample Program
  843.  
  844.                  if (CarrierLost) then
  845.                   begin
  846.                     ClearTransmit;
  847.                     ClearReceive;
  848.                     LogoutUser;
  849.                   end
  850.                  else DisplayMainMenu;
  851.  
  852.             See Also:            See Also:            See Also: ClearTransmit.
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.                               BBSkit Manual      Page 15
  891.  
  892.  
  893.  
  894.  
  895.  
  896.                                                            ClearTransmit
  897.  
  898.             PROCEDURE TBBS.ClearTransmit;            PROCEDURE TBBS.ClearTransmit;            PROCEDURE TBBS.ClearTransmit;
  899.  
  900.                  ClearTransmit removes any characters waiting to      be
  901.             transmitted out the COM port immediately, without waiting to
  902.             send them.
  903.  
  904.             Sample Program            Sample Program            Sample Program
  905.  
  906.                  if (CarrierLost) then
  907.                   begin
  908.                     ClearTransmit;
  909.                     ClearReceive;
  910.                     LogoutUser;
  911.                   end
  912.                  else DisplayMainMenu;
  913.  
  914.             See Also:            See Also:            See Also: ClearReceive.
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.                               BBSkit Manual      Page 16
  952.  
  953.  
  954.  
  955.  
  956.  
  957.                                                                ClosePort
  958.  
  959.             PROCEDURE TBBS.ClosePort(LowerDTR : Boolean);            PROCEDURE TBBS.ClosePort(LowerDTR : Boolean);            PROCEDURE TBBS.ClosePort(LowerDTR : Boolean);
  960.  
  961.                  Closes the current COM port down.  If LowerDTR is TRUE,
  962.             then the DTR line to the modem will also   be lowered before
  963.             the port is closed.  On program exit, DTR should be lowered.
  964.             For any shells to  external programs that need to send and
  965.             receive data from the user, LowerDTR should be FALSE.  (Some
  966.             modems place the phone on-hook when DTR is         lowered.)
  967.             Generally called from TBBS.Done before quitting the program.
  968.             Note: no data can be sent out the port once it has      been
  969.             closed.  It must first be re-opened.
  970.  
  971.             Sample Program            Sample Program            Sample Program
  972.  
  973.                  if (Quit = True) then ClosePort
  974.                  else WaitForNextCall;
  975.  
  976.             See Also:            See Also:            See Also: OpenPort.
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.                               BBSkit Manual      Page 17
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.                                                                      Cls
  1019.  
  1020.             PROCEDURE TBBS.Cls;            PROCEDURE TBBS.Cls;            PROCEDURE TBBS.Cls;
  1021.  
  1022.                  Clears the screen at the local and/or remote terminals,
  1023.             depending on the settings of SetOutput.  Screen clears    on
  1024.             the remote terminal are always accomplished    with terminal
  1025.             emulation.  If no terminal emulation is specified, TTY    is
  1026.             used as default and a character code   of 12 (^L) is sent.
  1027.             Most terminals interpret this as a screen clear code.
  1028.  
  1029.             See Also:            See Also:            See Also: Emu_ClearScreen, SetOutput.
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.                               BBSkit Manual      Page 18
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.                                                               ComReadKey
  1080.  
  1081.             FUNCTION TBBS.ComReadKey : Char;            FUNCTION TBBS.ComReadKey : Char;            FUNCTION TBBS.ComReadKey : Char;
  1082.  
  1083.                  This is the basic function used when waiting  for a key
  1084.             from the remote user or local    keyboard.  Optionally, the
  1085.             carrier is   watched, timeouts are observed, and local
  1086.             function keypresses are handled.   If no key is waiting at
  1087.             either the modem or keyboard, ComReadKey  will wait for one.
  1088.             Where the key comes from depends  on settings made with the
  1089.             SetInput procedure.
  1090.  
  1091.             Sample Program            Sample Program            Sample Program
  1092.  
  1093.                  Ch := UpCase(ComReadKey);
  1094.                  case Ch of
  1095.                    'M' : MessageSection;
  1096.                    'F' : FilesSection;
  1097.                    'G' : Goodbye;
  1098.                  else
  1099.                    ComWriteLn('Illegal command.');
  1100.                  end;
  1101.  
  1102.             See Also:            See Also:            See Also:    ComReadKeyE, ComReadLn,          ComReadLnWrap,
  1103.             SetCarrierChk, SetInput, SetTimer, SetTimerDelay.
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.                               BBSkit Manual      Page 19
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.                                                              ComReadKeyE
  1141.  
  1142.             FUNCTION TBBS.ComReadKeyE;            FUNCTION TBBS.ComReadKeyE;            FUNCTION TBBS.ComReadKeyE;
  1143.  
  1144.                  ComReadKeyE functions exactly like its      counterpart
  1145.             ComReadKey, except ComReadKeyE will also echo    the pressed
  1146.             key to either the screen, the  modem, or both, depending on
  1147.             the settings from SetOutput.
  1148.                  If SetEcho has been  used to set the echo to anything
  1149.             except #0 (null), then that character will be echoed back to
  1150.             the user instead of the character typed.
  1151.  
  1152.             See Also:            See Also:            See Also: ComReadKey, SetEcho, SetOutput.
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.                               BBSkit Manual      Page 20
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.                                                                ComReadLn
  1202.  
  1203.             PROCEDURE TBBS.ComReadLn(var Inp : String; Max : Byte);            PROCEDURE TBBS.ComReadLn(var Inp : String; Max : Byte);            PROCEDURE TBBS.ComReadLn(var Inp : String; Max : Byte);
  1204.  
  1205.                  ComReadLn is the main procedure for accepting a line of
  1206.             input from the user.  It  rejects all controls codes except
  1207.             the following:
  1208.  
  1209.                       ^H (#8)   Backspace with rubout
  1210.                       ^I (#9)        Tab to next tabstop
  1211.                       ^M (#13)  Enter
  1212.                       ^X (#24)  Line erase, start at beginning
  1213.  
  1214.                  Max is the maximum number of  characters it will accept
  1215.             on one line.  If Max     is reached, no other non-editing
  1216.             characters (those above)   will be accepted.  The line as
  1217.             entered by the user  or local terminal will be returned in
  1218.             Inp.
  1219.                  ComReadLn is affected by  all standard BBSkit watches,
  1220.             such as carrier  checking and timeout, as well as accepting
  1221.             input based on the SetInput procedure.
  1222.                  If Max is equal  to zero, then no characters except a
  1223.             carriage return (enter) will be accepted.  This may       be
  1224.             useful for any "Press enter to  continue..." prompts you may
  1225.             have.
  1226.  
  1227.             Sample Program            Sample Program            Sample Program
  1228.  
  1229.                  ComWrite('Enter your first name: ');
  1230.                  ComReadLn(Username, 30);
  1231.  
  1232.             See Also:            See Also:            See Also: ComReadLnWrap, SetEcho.
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.                               BBSkit Manual      Page 21
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.                                                            ComReadLnWrap
  1263.  
  1264.             PROCEDURE TBBS.ComReadLnWrap(var Inp : String; Max : Byte;            PROCEDURE TBBS.ComReadLnWrap(var Inp : String; Max : Byte;            PROCEDURE TBBS.ComReadLnWrap(var Inp : String; Max : Byte;
  1265.             var Wrap : String);            var Wrap : String);            var Wrap : String);
  1266.  
  1267.                  This  procedure is identical to ComReadLn, except it
  1268.             adds the Wrap parameter.  It  is primarily intended for the
  1269.             creation of line editors.   When the user attempts to type
  1270.             past the end of the line (as defined   by Max), the partial
  1271.             word being entered is stripped from the end      of Inp and
  1272.             stuffed into  Wrap.  This also applies to data already in
  1273.             Wrap before calling ComReadLnWrap.  Any data in  Wrap at the
  1274.             start of  the procedure is stuffed into the first part of
  1275.             Inp.  Thus,  multiple calls to ComReadLnWrap will allow the
  1276.             user to enter everything he wants to, without  having to hit
  1277.             return at the end of a line.
  1278.  
  1279.             Sample Program            Sample Program            Sample Program
  1280.  
  1281.                  Wrap := ''; { empty it before calling ComReadLnWrap }
  1282.                  CurLine := 0;
  1283.                  Repeat
  1284.                    Inc(CurLine); { increment CurLine by 1 }
  1285.                    ComReadLn(Buffer[CurLine], 78, Wrap); { read line }
  1286.                  Until (Buffer[CurLine] = '/s'); { until /s is typed }
  1287.  
  1288.             See Also:            See Also:            See Also: ComReadLn.
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                               BBSkit Manual      Page 22
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.                                                                 ComWrite
  1324.  
  1325.             PROCEDURE TBBS.ComWrite(Strn : String);            PROCEDURE TBBS.ComWrite(Strn : String);            PROCEDURE TBBS.ComWrite(Strn : String);
  1326.  
  1327.                  ComWrite sends Strn  out the modem and/or to the local
  1328.             screen without issuing a newline at the   end of Strn.  In
  1329.             other words, the cursor is left "dangling."  If page pausing
  1330.             is active, you should not imbed carriage returns       (#13)
  1331.             within Strn, or page pausing will not be able to  keep track
  1332.             of the lines that have been sent out.
  1333.  
  1334.             See Also:            See Also:            See Also: ComWriteLn,  SetOutput, SetPaging, SetPagingLines,
  1335.             SetPagingMsg.
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.                               BBSkit Manual      Page 23
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                                                               ComWriteLn
  1385.  
  1386.             PROCEDURE TBBS.ComWriteLn(Strn : String);            PROCEDURE TBBS.ComWriteLn(Strn : String);            PROCEDURE TBBS.ComWriteLn(Strn : String);
  1387.  
  1388.                  ComWriteLn sends Strn out the modem and/or to the local
  1389.             screen, depending on the settings of    SetOutput.  If page
  1390.             pausing is   set with the SetPaging and SetPagingLines
  1391.             procedures, this function  will keep track of the number of
  1392.             carriage returns sent out  the modem and pause when a full
  1393.             screen has been reached.
  1394.                  However, you should not                                     not                                     not send imbedded carriage returns
  1395.             in your strings, as ComWriteLn does  not currently check for
  1396.             those characters.  For example, don't do this:
  1397.  
  1398.                  ComWriteLn(#13#13);
  1399.  
  1400.                  if you wanted to skip three lines.   Instead, just call
  1401.             ComWriteLn('') three times and keep the line counter in sync
  1402.             with the actual number of lines sent out.
  1403.  
  1404.             See Also:            See Also:            See Also:  ComWrite, SetOutput,  SetPaging, SetPagingLines,
  1405.             SetPagingMsg.
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.                               BBSkit Manual      Page 24
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.                                                                 CopyFile
  1446.  
  1447.             FUNCTION CopyFile(Source, Dest : String) : Boolean;            FUNCTION CopyFile(Source, Dest : String) : Boolean;            FUNCTION CopyFile(Source, Dest : String) : Boolean;
  1448.  
  1449.                  CopyFile copies the source file contained in Source to
  1450.             the destination path or file contained in Dest.     CopyFile
  1451.             can intelligently determine   whether Dest is a path to a
  1452.             directory, or a path to a file, and act accordingly.
  1453.                  If Dest is a path to a directory, CopyFile       simply
  1454.             copies the file Source  to the destination directory Dest.
  1455.             If Source is invalid, or if    CopyFile encounters an error
  1456.             (such as a disk full, or a problem inside the file such as a
  1457.             bad sector), the function will return  FALSE.  If no errors
  1458.             are encountered, TRUE is returned.
  1459.                  If Dest is a path to a   file, CopyFile will copy the
  1460.             file Source over the file Dest.  Any data contained  by Dest
  1461.             is forever lost, because  CopyFile will also overwrite the
  1462.             directory entry (which what a file    undeleter uses).  The
  1463.             return value is FALSE if any    errors are encountered, and
  1464.             TRUE if no errors were encountered.
  1465.                  In either case, if Source is invalid, or if   Dest is a
  1466.             path to directory which does not exist (example: C:\TEMP\ if
  1467.             TEMP does not exist off of      C:'s root directory), then
  1468.             CopyFile will return FALSE.
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.                               BBSkit Manual      Page 25
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.                                                                     Date
  1507.  
  1508.             FUNCTION Date : String;            FUNCTION Date : String;            FUNCTION Date : String;
  1509.  
  1510.                  Date returns the current date from the internal   clock
  1511.             (if any) or from DOS (if there is no clock) in the      form
  1512.             MM/DD/YY.   For months, days, and years that have no tens
  1513.             digit (such  as January 1, 2001), the empty space will be
  1514.             filled with a zero.  Therefore, January 1, 2001 would format
  1515.             to 01/01/01.  The string returned by Date will   always                                                             always                                                             always be 8
  1516.             characters in length.
  1517.  
  1518.             See Also:            See Also:            See Also: Time.
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.                               BBSkit Manual      Page 26
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.                                                                     Dial
  1568.  
  1569.             PROCEDURE TBBS.Dial(Number : String);            PROCEDURE TBBS.Dial(Number : String);            PROCEDURE TBBS.Dial(Number : String);
  1570.  
  1571.                  Dial attempts to  send an "ATD..." command out to your
  1572.             Hayes-compatible modem to   dial a number.  If your phone
  1573.             lines do not support  Touch-Tone dialing, make sure Number
  1574.             has a P as its first character, which      will force pulse
  1575.             dialing.
  1576.                  The programmer is expected   to check for success or
  1577.             failure of the call, and whether     or not a carrier was
  1578.             detected.
  1579.  
  1580.             Sample Program            Sample Program            Sample Program
  1581.  
  1582.                  Dial('555-1234');
  1583.                  WaitFor('C', 30);  {wait 30 seconds for a 'C'.  A 'NO}
  1584.                                  {CARRIER' will return success, as }
  1585.                                  {will a 'CONNECT'            }
  1586.                  if (Online) then
  1587.                   begin
  1588.                     ComReadLn(Result, 40);
  1589.                     Bps := StrToInt(Copy(Result, 8, 5));
  1590.                     if (Bps = 0) then Bps := 300;
  1591.                     SetBps(Bps);
  1592.                     TerminalMode(Full);
  1593.                   end;
  1594.  
  1595.             See Also:            See Also:            See Also: TerminalMode.
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.                               BBSkit Manual      Page 27
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.                                                                  Emu_...
  1629.  
  1630.             PROCEDURE TBBS.Emu_...(...);            PROCEDURE TBBS.Emu_...(...);            PROCEDURE TBBS.Emu_...(...);
  1631.  
  1632.                  These methods are provided for BBSkit to interface with
  1633.             a number of ANSI and non-ANSI terminals with as       little
  1634.             trouble as possible.  Templates are loaded in with       the
  1635.             LoadEmulation method, and the codes are accessed with these
  1636.             calls.  Additional templates    must be created with the
  1637.             EmuMaker program, provided on the distribution disk.
  1638.                  The methods currently available are:
  1639.  
  1640.                  GotoXY(X, Y : Byte)     Goes to the screen location at
  1641.                                      X, Y.
  1642.                  CursorUp            Moves the cursor up one line.
  1643.                  CursorDown          Moves the cursor down one line.
  1644.                  CursorLeft          Moves the cursor left one column.
  1645.                  CursorRight         Moves the cursor right one column.
  1646.                  ClearScreen         Clears the screen, places cursor at
  1647.                                      1,1.
  1648.                  ClearToTop          Clears from cursor line to top of
  1649.                                      screen, cursor position is
  1650.                                      unchanged.
  1651.                  ClearToEndOfScreen  Clears from cursor line to bottom
  1652.                                      of screen, cursor position is
  1653.                                      unchanged.
  1654.                  ClearToEndOfLine    Clears from cursor column to the
  1655.                                      end of the line the cursor is on.
  1656.                                      Cursor position is unchanged.
  1657.                  ReverseVideo        Swaps the foreground and background
  1658.                                      color attributes.  Sometimes called
  1659.                                      "inverse video."
  1660.                  NormalVideo         Swaps the foreground and background
  1661.                                      color attributes.  Cancels the
  1662.                                      effects of ReverseVideo.
  1663.                  ScrollUp            Moves the entire screen up one
  1664.                                      line.  Top line is lost.
  1665.                  ScrollDown          Moves the entire screen down one
  1666.                                      line.  Bottom line is lost.
  1667.                  InsertLine          Inserts a blank line before the
  1668.                                      line the cursor is on.  All other
  1669.                                      lines below the cursor line are
  1670.                                      moved down one line, and the bottom
  1671.                                      line is lost.
  1672.                  DeleteLine          Deletes the cursor line, and moves
  1673.                                      all lines below it up one line.  A
  1674.                                      blank line is inserted at the
  1675.                                      bottom of the screen.
  1676.                  InsertChar          Inserts a space at the cursor
  1677.                                      position.  All other characters
  1678.                                      following the cursor on the current
  1679.                                      line are moved to the left one
  1680.                                      character.  Any character in the
  1681.  
  1682.  
  1683.                               BBSkit Manual      Page 28
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.                                                                  Emu_...
  1690.  
  1691.                                      80th column is lost.
  1692.                  DeleteChar          Deletes the character under the
  1693.                                      cursor.  All other characters
  1694.                                      following the cursor on the current
  1695.                                      line are moved to the left one
  1696.                                      character.  A space is inserted at
  1697.                                      column 80.
  1698.                  Color(Fore, Back:Byte)  Changes the foreground color to
  1699.                                      Fore, and the background color to
  1700.                                      Back.
  1701.  
  1702.                  For ANSI.EMU,  ReverseVideo                                ReverseVideo                                ReverseVideo and  NormalVideo                                                  NormalVideo                                                  NormalVideo have  some
  1703.             special properties.  ReverseVideo and NormalVideo     simply
  1704.             swap the foreground and background colors;  there is no real
  1705.             inverse video or normal video in ANSI.EMU.  So, two calls to
  1706.             ReverseVideo would be the same as one to ReverseVideo    and
  1707.             one to NormalVideo.    These methods must be handled with
  1708.             care, or the other emulations will get funny results    from
  1709.             your code.  For blinking colors,    Color                                                Color                                                Color must be passed   a
  1710.             background color of greater than 7.  This will result in the
  1711.             background color being  (Back - 7) and the foreground color
  1712.             will blink.
  1713.                  Remember that all calls must be  prefixed with Emu_, so
  1714.             a call to CursorUp, for example, would look like this:
  1715.  
  1716.                  Emu_CursorUp;
  1717.  
  1718.             See Also:            See Also:            See Also: LoadEmulation.
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.                               BBSkit Manual      Page 29
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.                                                                    Exist
  1751.  
  1752.             FUNCTION Exist(Filename : String) : Boolean;            FUNCTION Exist(Filename : String) : Boolean;            FUNCTION Exist(Filename : String) : Boolean;
  1753.  
  1754.                  Exist returns TRUE if Filename exists.  Wildcards   can
  1755.             be passed as a filename, and if any files are found in   the
  1756.             path specified by the   beginning of Filename, Exist will
  1757.             still return TRUE.  Exist cannot find files which are hidden
  1758.             from a normal DIR command from DOS.
  1759.                  For example, to    find out if there are any files
  1760.             matching the mask *.COM  in the C:\DOS\ directory, execute
  1761.             Exist like this:
  1762.  
  1763.                  if (Exist('C:\DOS\*.COM')) then
  1764.                     WriteLn('Found!');
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.                               BBSkit Manual      Page 30
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.                                                          F... & ...Arrow
  1812.  
  1813.             FUNCTION TBBS.F... : Boolean; VIRTUAL;            FUNCTION TBBS.F... : Boolean; VIRTUAL;            FUNCTION TBBS.F... : Boolean; VIRTUAL;
  1814.             FUNCTION TBBS....Arrow : Boolean; VIRTUAL;            FUNCTION TBBS....Arrow : Boolean; VIRTUAL;            FUNCTION TBBS....Arrow : Boolean; VIRTUAL;
  1815.  
  1816.                  These methods are those called by           ComReadKey,
  1817.             ComReadKeyE, ComReadLn, and ComReadLnWrap       whenever a
  1818.             function key or arrow key is pressed on  the local keyboard.
  1819.             When such an event occurs, control is briefly  passed to the
  1820.             appropriate routine, and a user-defined action can then take
  1821.             place.  For example,  if F1 were pressed,  TBBS.F1                                                       TBBS.F1                                                       TBBS.F1 would be
  1822.             called.
  1823.                  These methods are provided empty.   It is their purpose
  1824.             to provide the programmer  with several empty methods that
  1825.             can be filled with local mode actions.  A BBS might use  the
  1826.             function keys for various sysop actions, such as initiating
  1827.             a chat session with ther user, editing his         security,
  1828.             toggling the printer,   toggling the "sysop is available"
  1829.             flag, and virtually   anything else the programmer wants.
  1830.             Keep in mind, though, that the purpose of the methods  is to
  1831.             allow the sysop to do things while a user is  online without
  1832.             that user being able to notice any time lagging.  Therefore,
  1833.             the routines should be kept simple, except in cases    where
  1834.             you want                want                want the user to know something is happened,   such as a
  1835.             chat session.
  1836.                  Function keys F1  throught F12 are provided.  (F11 and
  1837.             F12 are only available on AT-style  machines, however.)  All
  1838.             four arrow keys are    provided as well, and all of the
  1839.             routines are virtual                         virtual                         virtual.
  1840.                  The return values for these routines    are all of the
  1841.             Boolean type.  In    almost all circumstances, the value
  1842.             returned should be FALSE.  However, there are times when the
  1843.             key pressed could eject the    user from a BBS.  In these
  1844.             circumstances, when you do  not                                        not                                        not want the user to finish the
  1845.             input that was interrupted, the return value should be TRUE.
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.                               BBSkit Manual      Page 31
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.                                                            GetAnswerMode
  1873.  
  1874.             FUNCTION TBBS.GetAnswerMode : Byte;            FUNCTION TBBS.GetAnswerMode : Byte;            FUNCTION TBBS.GetAnswerMode : Byte;
  1875.  
  1876.                  GetAnswerMode returns a byte value corresponding to one
  1877.             of two constants defined for the way your  modem will answer
  1878.             the phone.  In   Originate                             Originate                             Originate mode, BBSkit will send the    ATD
  1879.             string, which simulates originating a call, and proceed   to
  1880.             wait for a carrier.  In  Answer                                     Answer                                     Answer  mode, BBSkit will send ATA
  1881.             and wait for the remote modem to connect to the      carrier
  1882.             being sent.
  1883.                  This method does not   do anything for your program.
  1884.             Rather, it  is provided for your program to keep track of
  1885.             what mode it might be in at any given time.  There are other
  1886.             methods which do the "work" of picking up the phone      and
  1887.             connecting.
  1888.  
  1889.             Sample Program            Sample Program            Sample Program
  1890.  
  1891.                  A := GetAnswerMode;
  1892.                  case A of
  1893.                    Originate : WriteLn('In originate mode.');
  1894.                    Answer  : WriteLn('In answer mode.');
  1895.                  end;
  1896.  
  1897.             See Also:            See Also:            See Also: PickupPhone, SetAnswerMode.                                                .                                                .
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.                               BBSkit Manual      Page 32
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.                                                                   GetBps
  1934.  
  1935.             FUNCTION TBBS.GetBps : LongInt;            FUNCTION TBBS.GetBps : LongInt;            FUNCTION TBBS.GetBps : LongInt;
  1936.  
  1937.                  GetBps returns the current operating speed in bits per
  1938.             second on the current COM port.  If you have not set the bit
  1939.             rate previously, GetBps will return a -1.
  1940.  
  1941.             Sample Program            Sample Program            Sample Program
  1942.  
  1943.                  WriteLn('Operating at ', GetBps, 'bps.');
  1944.  
  1945.             See Also:            See Also:            See Also: SetBps.
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.                               BBSkit Manual      Page 33
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.                                                                 GetInput
  1995.  
  1996.             PROCEDURE TBBS.GetInput(var Con, Rem : Boolean);            PROCEDURE TBBS.GetInput(var Con, Rem : Boolean);            PROCEDURE TBBS.GetInput(var Con, Rem : Boolean);
  1997.  
  1998.                  GetInput returns the conditions of input redirection in
  1999.             Con and Rem which were previously set by a call to SetInput.
  2000.             If input is being accepted from the local keyboard, Con will
  2001.             return TRUE.  If input is being accepted from the modem, Rem
  2002.             will return TRUE.  In either case,   if input is not being
  2003.             accepted, a FALSE value will be returned.
  2004.                  This method is mainly  used for "remembering" the old
  2005.             settings of input redirection when your  program goes off to
  2006.             do something that only the local    operator is supposed to
  2007.             know about (such as verifying a new user on a BBS).
  2008.  
  2009.             See Also:            See Also:            See Also: GetOutput, SetInput, SetOutput.
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.                               BBSkit Manual      Page 34
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.                                                                GetOutput
  2056.  
  2057.             PROCEDURE TBBS.GetOutput(var Con, Rem : Boolean);            PROCEDURE TBBS.GetOutput(var Con, Rem : Boolean);            PROCEDURE TBBS.GetOutput(var Con, Rem : Boolean);
  2058.  
  2059.                  GetOutput returns the conditions of output  redirection
  2060.             in Con and Rem   which were previously set by a call to
  2061.             SetOutput.  If output is being sent to the local screen, Con
  2062.             will return TRUE.  If output is being   sent out the serial
  2063.             port to the modem, Rem will return TRUE.  In either case, if
  2064.             output is not being sent, a FALSE value will be returned.
  2065.                  This method, like GetInput,      is mainly used for
  2066.             "remembering" the old values of output redirection, and   is
  2067.             usually used in conjunction with GetInput.
  2068.  
  2069.             See Also:            See Also:            See Also: GetInput, SetInput, SetOutput.
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.                               BBSkit Manual      Page 35
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.                                                             GetScreenStr
  2117.  
  2118.             PROCEDURE GetScreenStr(X1, X2, Y : Byte; var St : String);            PROCEDURE GetScreenStr(X1, X2, Y : Byte; var St : String);            PROCEDURE GetScreenStr(X1, X2, Y : Byte; var St : String);
  2119.  
  2120.                  GetScreenStr copies characters from the local    screen
  2121.             into the string St.  All characters on line Y, from X1    to
  2122.             X2, inclusive, are copied into the string.  The    resulting
  2123.             string is then of exact length of the  characters you wanted
  2124.             to copy.
  2125.                  Note that this procedure acts completely independent of
  2126.             any Window(...) calls that have been  made, so you may need
  2127.             to use the WindMin CRT variable to obtain the desired text.
  2128.                  Applications for this procedure are saving    the local
  2129.             screen for a DOS    shell, so that the entire screen is
  2130.             restored when the DOS shell is exited from, and    reminding
  2131.             the user of where he was before a chat session           was
  2132.             initiated.  (You can copy the entire line that the cursor is
  2133.             on when chat is entered, and when it is   exited, rewrite it
  2134.             back to the screen.  Usually, that   line you copied was a
  2135.             prompt of some sort.)
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.                               BBSkit Manual      Page 36
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.                                                            GetScreenWord
  2178.  
  2179.             PROCEDURE GetScreenWord(X, Y : Byte; var Attr : Byte; var Ch            PROCEDURE GetScreenWord(X, Y : Byte; var Attr : Byte; var Ch            PROCEDURE GetScreenWord(X, Y : Byte; var Attr : Byte; var Ch
  2180.             : Char);            : Char);            : Char);
  2181.  
  2182.                  GetScreenWord finds the character and attribute  values
  2183.             for the screen location X,Y and returns them in Attr and Ch.
  2184.             X,Y are absolute screen coordinates, not relative to     the
  2185.             current window.
  2186.                  GetScreenWord goes directly to video memory.
  2187.  
  2188.             See Also:            See Also:            See Also: PutScreenWord.
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.                               BBSkit Manual      Page 37
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.                                                                  GetText
  2239.  
  2240.             PROCEDURE GetText(X1, Y1, X2, Y2 : Byte; var Dest);            PROCEDURE GetText(X1, Y1, X2, Y2 : Byte; var Dest);            PROCEDURE GetText(X1, Y1, X2, Y2 : Byte; var Dest);
  2241.  
  2242.                  GetText is the text-mode equivalent of GetImage.    X1,
  2243.             Y1 are the coordinates of the upper left corner of the block
  2244.             of text you wish to copy.  X2, Y2 are the coordinates of teh
  2245.             lower right corner.  All coordinates are absolute,       not
  2246.             relative to the current window.
  2247.                  Dest is an untyped variable parameter.  It should    be
  2248.             passed the pointer to a location in memory that you  wish to
  2249.             place the text captured.
  2250.                  Text captured will retain its attribute byte as well as
  2251.             the character seen.  The memory required for a GetText image
  2252.             is calculated through the TextMemSize function.
  2253.  
  2254.             Sample Program            Sample Program            Sample Program
  2255.  
  2256.                  Var
  2257.                    Dest : Pointer;
  2258.  
  2259.                  BEGIN
  2260.                    GetMem(Dest, TextMemSize(1, 1, 10, 10)); {get memory}
  2261.                    GetText(1, 1, 10, 10, Dest^);  {get the text}
  2262.                    ClrScr;  {clear the screen}
  2263.                    ReadLn;  {wait for user}
  2264.                    PutText(1, 1, Dest^);  {put text back}
  2265.                  END.
  2266.  
  2267.             See Also:            See Also:            See Also: PutText, TextMemSize.
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.                               BBSkit Manual      Page 38
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.                                                                   Hangup
  2300.  
  2301.             FUNCTION TBBS.Hangup : Boolean;            FUNCTION TBBS.Hangup : Boolean;            FUNCTION TBBS.Hangup : Boolean;
  2302.  
  2303.                  Hangup will attempt to hang up the modem      if it is
  2304.             currently off-hook.  BBSkit will first try to lower the Data
  2305.             Terminal Ready (DTR) line for two seconds.   This makes most
  2306.             modems drop carrier if they are online.  If this      fails,
  2307.             Hangup will then  try to send the attention string (default
  2308.             is +++, but can be changed by AT commands), followed      by
  2309.             ATH0.  If this also fails, a FALSE value will be returned to
  2310.             the calling routine.  If the DTR drop  succeeds, BBSkit will
  2311.             not attempt to send the hangup    string to the modem.  If
  2312.             Hangup is successful in dropping carrier,  a TRUE value will
  2313.             be returned.
  2314.  
  2315.             Sample Program            Sample Program            Sample Program
  2316.  
  2317.                  if (not Hangup) then WriteLn('Unable to hangup!')
  2318.                  else WriteLn('Disconnected with remote modem.');
  2319.  
  2320.             See Also:            See Also:            See Also: Online.
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.                               BBSkit Manual      Page 39
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.                                                               HideCursor
  2361.  
  2362.             PROCEDURE HideCursor;            PROCEDURE HideCursor;            PROCEDURE HideCursor;
  2363.  
  2364.                  HideCursor turns the cursor  off on the local screen.
  2365.             It is intended for turning off the cursor when text is being
  2366.             continuously shown in the  same area, without a flickering
  2367.             cursor creating a static effect on screen.  Most of      the
  2368.             time, the cursor should be on.
  2369.                  The cursor can be turned back on with the    ShowCursor
  2370.             procedure.
  2371.  
  2372.             See Also:            See Also:            See Also: ShowCursor.
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.                               BBSkit Manual      Page 40
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.                                                                 Incoming
  2422.  
  2423.             FUNCTION TBBS.Incoming : Boolean;            FUNCTION TBBS.Incoming : Boolean;            FUNCTION TBBS.Incoming : Boolean;
  2424.  
  2425.                  Incoming reports a boolean value     depending on the
  2426.             status of the input buffer of the serial      port, and the
  2427.             keyboard buffer of the local terminal.  If either the FOSSIL
  2428.             driver or the keyboard reports a key waiting,       Incoming
  2429.             returns a TRUE value.  Otherwise,  Incoming returns a FALSE.
  2430.             Incoming does                     does                     does  check the status of input redirection,    and
  2431.             will not consider a device if      BBSkit is not currently
  2432.             accepting input from it.
  2433.                  Note that this method does not distinguish between the
  2434.             keyboard or the modem.  It simply returns  a value reporting
  2435.             whether or not a key is waiting at either device.
  2436.  
  2437.             Sample Program            Sample Program            Sample Program
  2438.  
  2439.                  if (Incoming) then
  2440.                   begin
  2441.                     if (Keypressed) then
  2442.                        WriteLn('Key waiting at keyboard.');
  2443.                     if (ChWaiting) then
  2444.                        WriteLn('Key waiting at modem.');
  2445.                   end;
  2446.  
  2447.             See Also:            See Also:            See Also: ChWaiting, CRT.Keypressed.
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.                               BBSkit Manual      Page 41
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.                                                                     Init
  2483.  
  2484.             CONSTRUCTOR TBBS.Init;            CONSTRUCTOR TBBS.Init;            CONSTRUCTOR TBBS.Init;
  2485.  
  2486.                  Init is the standard means for initializing        your
  2487.             program.  Even though this method does not contain a virtual                                                                 virtual                                                                 virtual
  2488.             keyword, it is still programmer-overridable and    should be
  2489.             overridden to initialize your own variables and        such.
  2490.             However, you should still  call TBBS.Init from within your
  2491.             own Init method to insure that    BBSkit can initialize the
  2492.             variables it needs to at runtime.
  2493.  
  2494.             Sample Program            Sample Program            Sample Program
  2495.  
  2496.                  BEGIN
  2497.                    TBBS.Init;
  2498.                  END.
  2499.  
  2500.             See Also:            See Also:            See Also: Run, Done.
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.                               BBSkit Manual      Page 42
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.                                                                 IntToStr
  2544.  
  2545.             FUNCTION IntToStr(Num : LongInt) : String;            FUNCTION IntToStr(Num : LongInt) : String;            FUNCTION IntToStr(Num : LongInt) : String;
  2546.  
  2547.                  IntToStr converts the   long integer (or integer, or
  2548.             word, or byte, etc.) in Num    to a string and returns the
  2549.             result as a function.  It's basically the way   that the Str
  2550.             procedure should have been written from the beginning.
  2551.                  ComWrite and ComWriteLn cannot handle non-string types,
  2552.             so IntToStr must be performed on  all integer-type value you
  2553.             want to send out the serial port.
  2554.  
  2555.             Sample Program            Sample Program            Sample Program
  2556.  
  2557.                  ComWriteLn('Calls: ' + IntToStr(TotalCalls));
  2558.  
  2559.             See Also:            See Also:            See Also: StrToInt.
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.                               BBSkit Manual      Page 43
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.                                                                     Left
  2605.  
  2606.             FUNCTION Left(Strn : String; Places : Byte) : String;            FUNCTION Left(Strn : String; Places : Byte) : String;            FUNCTION Left(Strn : String; Places : Byte) : String;
  2607.  
  2608.                  Left left-justifies Strn to Places places.  This is for
  2609.             formatting text to a uniform width, and pushes  all the text
  2610.             in Strn to left side of the justified   string.  If needed,
  2611.             spaces are added to the    end of the string before it is
  2612.             returned as the function result.
  2613.                  If Strn is more than Places  characters long, Strn will
  2614.             be truncated to  a length of Places, and no left-justifying
  2615.             will be done (it isn't needed in that case).
  2616.  
  2617.             See Also:            See Also:            See Also: Center, Space, Right.
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.                               BBSkit Manual      Page 44
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.                                                            LoadEmulation
  2666.  
  2667.             FUNCTION TBBS.LoadEmulation(Fname : String) : Boolean;            FUNCTION TBBS.LoadEmulation(Fname : String) : Boolean;            FUNCTION TBBS.LoadEmulation(Fname : String) : Boolean;
  2668.  
  2669.                  LoadEmulation loads a previously defined      emulation
  2670.             template into memory from the filename contained in   Fname.
  2671.             Fname should not contain     an extension, as ".EMU" is
  2672.             automatically added by LoadEmulation.  If the template   was
  2673.             loaded without error, TRUE is returned.  If  any errors were
  2674.             detected, FALSE is returned.
  2675.                  Once a template is loaded, any    calls to the Emu_...
  2676.             procedures will use the new codes  loaded from the template.
  2677.             The old template in memory is lost, and must be  reloaded to
  2678.             be used again.
  2679.                  Additional templates can be  created with the EmuMaker
  2680.             program, provided on the BBSkit distribution disk.
  2681.  
  2682.             See Also:            See Also:            See Also: Emu_....
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.                               BBSkit Manual      Page 45
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.                                                                    Lower
  2727.  
  2728.             FUNCTION Lower(Strn : String) : String;            FUNCTION Lower(Strn : String) : String;            FUNCTION Lower(Strn : String) : String;
  2729.  
  2730.                  Lower returns Strn with all of its uppercase characters
  2731.             converted to lower case.  Characters      not in the range
  2732.             'A'..'Z' are unaffected.
  2733.  
  2734.             Sample Program            Sample Program            Sample Program
  2735.  
  2736.                  WriteLn(Lower('BBSkit'));
  2737.  
  2738.             Sample Run            Sample Run            Sample Run
  2739.  
  2740.                  bbskit
  2741.  
  2742.             See Also:            See Also:            See Also: Upper.
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.                               BBSkit Manual      Page 46
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.                                                                   Online
  2788.  
  2789.             FUNCTION TBBS.Online : Boolean;            FUNCTION TBBS.Online : Boolean;            FUNCTION TBBS.Online : Boolean;
  2790.  
  2791.                  Online returns the status  of the carrier detect (CD)
  2792.             line of the current COM port.    If a carrier is detected,
  2793.             Online returns TRUE.  Otherwise, Online returns FALSE.
  2794.  
  2795.             Sample Program            Sample Program            Sample Program
  2796.  
  2797.                  while (Online) do
  2798.                   begin
  2799.                     WriteLn('Still online!');
  2800.                   end;
  2801.                  WriteLn('Carrier lost!');
  2802.  
  2803.             See Also:            See Also:            See Also: CarrierLost.
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                               BBSkit Manual      Page 47
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.                                                                 OpenPort
  2849.  
  2850.             PROCEDURE TBBS.OpenPort(Comport : Byte);            PROCEDURE TBBS.OpenPort(Comport : Byte);            PROCEDURE TBBS.OpenPort(Comport : Byte);
  2851.  
  2852.                  OpenPort initializes Comport for use by          BBSkit
  2853.             routines.  If Comport is equal to 1, then COM1 will be used.
  2854.             If Comport equals 2, then COM2 will   be used, up to COM4.
  2855.             Support for serial ports beyond COM4 is not provided.
  2856.                  OpenPort must                          must                          must be called  before any other serial port
  2857.             routines are used, unless    the FOSSIL has already been
  2858.             initialized by   another program.  In general, though,
  2859.             OpenPort is a requirement.
  2860.  
  2861.             Sample Program            Sample Program            Sample Program
  2862.  
  2863.                  OpenPort(1);  {use COM1}
  2864.                  ComWriteLn('Hello, World.');
  2865.                  ClosePort;
  2866.  
  2867.             See Also:            See Also:            See Also: ClosePort, SetPort.
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.                               BBSkit Manual      Page 48
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.                                                              PickupPhone
  2910.  
  2911.             PROCEDURE TBBS.PickupPhone;            PROCEDURE TBBS.PickupPhone;            PROCEDURE TBBS.PickupPhone;
  2912.  
  2913.                  PickupPhone will pick up the phone using the currently
  2914.             active answer mode.  If the answer mode is set to originate,
  2915.             then PickupPhone will pick up the phone and      wait for a
  2916.             carrier from the remote modem.  If   answer mode is set to
  2917.             answer, then PickupPhone   will pick up the phone, send a
  2918.             carrier, and wait for  the remote modem to connect to your
  2919.             modem.  In either case, PickupPhone  does not do the actual
  2920.             waiting.  Rather, you  must write code to detect whether a
  2921.             connection was established.
  2922.  
  2923.             Sample Program            Sample Program            Sample Program
  2924.  
  2925.                  (see sample program for TBBS.Dial)
  2926.  
  2927.             See Also:            See Also:            See Also: SetAnswerMode.
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.                               BBSkit Manual      Page 49
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.                                                            PutScreenWord
  2971.  
  2972.             PROCEDURE PutScreenWord(X, Y : Byte; Attr : Byte; Ch :            PROCEDURE PutScreenWord(X, Y : Byte; Attr : Byte; Ch :            PROCEDURE PutScreenWord(X, Y : Byte; Attr : Byte; Ch :
  2973.             Char);            Char);            Char);
  2974.  
  2975.                  PutScreenWord places the character  Ch in video memory
  2976.             at absolute location   X,Y with the attribute byte set to
  2977.             Attr.  This procedure goes directly to video memory, and may
  2978.             cause snow on some old CGA systems.  However, it is also   a
  2979.             bit faster, and  does not relocate the cursor after placing
  2980.             the character on-screen.
  2981.  
  2982.             See Also:            See Also:            See Also: GetScreenWord.
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.                               BBSkit Manual      Page 50
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.                                                                  PutText
  3032.  
  3033.             PROCEDURE PutText(X, Y : Byte; var Src);            PROCEDURE PutText(X, Y : Byte; var Src);            PROCEDURE PutText(X, Y : Byte; var Src);
  3034.  
  3035.                  PutText places the text in Src at absolute       screen
  3036.             coordinates X,Y.  PutText goes directly  to video memory and
  3037.             may cause snow on old CGA systems.
  3038.                  The  text placed on-screen must have been previously
  3039.             captured using the GetText call, or else random garbage will
  3040.             result.
  3041.  
  3042.             See Also:            See Also:            See Also: GetText.
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.                               BBSkit Manual      Page 51
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.                                                                  Receive
  3093.  
  3094.             FUNCTION TBBS.ReceiveXmodem(Fname : ComStr) : Boolean;            FUNCTION TBBS.ReceiveXmodem(Fname : ComStr) : Boolean;            FUNCTION TBBS.ReceiveXmodem(Fname : ComStr) : Boolean;
  3095.  
  3096.                  There is currently one transfer protocol      available
  3097.             directly to BBSkit programmers: Xmodem.  Registered versions
  3098.             of BBSkit will include support for  Xmodem/CRC,   Xmodem/1K,
  3099.             and Zmodem.
  3100.                  ReceiveXmodem is called with a single filename as   its
  3101.             argument, such as ReceiveXmodem('TEMP').  Xmodem is probably
  3102.             the most widely   used error checking protocol in the BBS
  3103.             community, although it is slow.  Error checking is done with
  3104.             a simple checksum.  Xmodem uses 128 byte      "packets."  A
  3105.             packet is all of the information sent to the other end in  a
  3106.             transfer at one time.
  3107.                  All protocol receive functions  return a boolean value
  3108.             depending on whether the  file transfer(s) were successful.
  3109.             TRUE is returned if there were      no problems, and FALSE
  3110.             otherwise.  The programmer is expected to take care       of
  3111.             failed transfers.  BBSkit does not delete or       otherwise
  3112.             change files which are the results    of a failed transfer.
  3113.             The protocol is operator-abortable by pressing ESCape on the
  3114.             local keyboard.
  3115.  
  3116.             Sample Program            Sample Program            Sample Program
  3117.  
  3118.                  Success := ReceiveXmodem(Filename);
  3119.                  if (not Success) then ComWriteLn('Transfer failed.')
  3120.                  else ComWriteLn('Transfer successful.');
  3121.  
  3122.             See Also:            See Also:            See Also: SendXmodem.
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.                               BBSkit Manual      Page 52
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.                                                                Replicate
  3154.  
  3155.             FUNCTION Replicate(Ch : String; Num : Byte) : String;            FUNCTION Replicate(Ch : String; Num : Byte) : String;            FUNCTION Replicate(Ch : String; Num : Byte) : String;
  3156.  
  3157.                  Replicate creates a string consisting of Num occurances
  3158.             of Ch, one after the other, in string format.    Although Ch
  3159.             can be multiple characters, this function is mainly intended
  3160.             for creating long, non-space areas of    text, such as menu
  3161.             headers or dividing lines.
  3162.  
  3163.             Sample Program            Sample Program            Sample Program
  3164.  
  3165.                  WriteLn(Replicate('BBSkit', 3));
  3166.  
  3167.             Sample Run            Sample Run            Sample Run
  3168.  
  3169.                  BBSkitBBSkitBBSkit
  3170.  
  3171.             See Also:            See Also:            See Also: Space.
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.                               BBSkit Manual      Page 53
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.                                                                    Right
  3215.  
  3216.             FUNCTION Right(Strn : String; Places : Byte) : String;            FUNCTION Right(Strn : String; Places : Byte) : String;            FUNCTION Right(Strn : String; Places : Byte) : String;
  3217.  
  3218.                  Right will right justify Strn to a length of    Places.
  3219.             If spaces are needed to make Strn Places long, they  will be
  3220.             added to the beginning of the string, pushing  the text over
  3221.             and right justifying  it.  The justified string is returned
  3222.             as the function result.
  3223.                  If Strn is more than Places long, the text on  the left
  3224.             side of Strn will be truncated to make it Places long.
  3225.  
  3226.             See Also:            See Also:            See Also: Center, Left, Space.
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.                               BBSkit Manual      Page 54
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.                                                                  Ringing
  3276.  
  3277.             FUNCTION TBBS.Ringing : Boolean;            FUNCTION TBBS.Ringing : Boolean;            FUNCTION TBBS.Ringing : Boolean;
  3278.  
  3279.                  Ringing will return the  status of the ring indicator
  3280.             (RI) line on the current serial port.  If a ring has    been
  3281.             detected, Ringing will return TRUE.  Otherwise, Ringing will
  3282.             return FALSE.
  3283.                  This method is mainly for use in wait for call loops.
  3284.  
  3285.             Sample Program            Sample Program            Sample Program
  3286.  
  3287.                  while (not Ringing) and (not Keypressed) do
  3288.                   begin
  3289.                     GotoXY(1, 1);
  3290.                     Write('Waiting For Call: ', Time);
  3291.                   end;
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.                               BBSkit Manual      Page 55
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.                                                                      Run
  3337.  
  3338.             PROCEDURE TBBS.Run; VIRTUAL;            PROCEDURE TBBS.Run; VIRTUAL;            PROCEDURE TBBS.Run; VIRTUAL;
  3339.  
  3340.                  Run is a virtual method that does all of   the work for
  3341.             your version of TBBS.   This routine should contain all of
  3342.             your BBS driving code, and should only exit when the  BBS is
  3343.             ready to be shut down.  Typically, it is called in the  main
  3344.             block of your program, right after                                                                                                      Init                                                  Init                                                  Init and right before
  3345.             Done            Done            Done.
  3346.  
  3347.             See Also:            See Also:            See Also: Done, Init.
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.                               BBSkit Manual      Page 56
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.                                                                   SendAT
  3398.  
  3399.             FUNCTION TBBS.SendAT(Cmd : String) : Boolean;            FUNCTION TBBS.SendAT(Cmd : String) : Boolean;            FUNCTION TBBS.SendAT(Cmd : String) : Boolean;
  3400.  
  3401.                  SendAT will send  Cmd out the current serial port, and
  3402.             wait for an "OK"  response from the modem for two seconds.
  3403.             If this response is not detected  within two seconds, SendAT
  3404.             returns FALSE.  If the response  is detected, SendAT returns
  3405.             TRUE.
  3406.                  All AT commands must be prefixed  with the "AT" command
  3407.             prefix.  SendAT does not add this header to commands sent to
  3408.             it to remain compatible with the escape sequence, which does
  3409.             not use an AT prefix.  It does, however,   append a carriage
  3410.             return to the end of Cmd.
  3411.  
  3412.             Sample Program            Sample Program            Sample Program
  3413.  
  3414.                  while (not SendAT('ATZ')) do
  3415.                     WriteLn('Modem not responding.  Trying again...');
  3416.  
  3417.             See Also:            See Also:            See Also: WaitFor.
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.                               BBSkit Manual      Page 57
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.                                                                     Send
  3459.  
  3460.             FUNCTION TBBS.SendXmodem(Fname : ComStr) : Boolean;            FUNCTION TBBS.SendXmodem(Fname : ComStr) : Boolean;            FUNCTION TBBS.SendXmodem(Fname : ComStr) : Boolean;
  3461.  
  3462.                  There is one   protocol directly available to BBSkit
  3463.             programmers for sending files to a remote modem:     Xmodem.
  3464.             Registered versions include support  for sending files with
  3465.             Xmodem/CRC, Xmodem/1K, and Zmodem.
  3466.                  SendXmodem is called with   a single filename as its
  3467.             argument.  Xmodem is an error checking protocol,       using
  3468.             checksum error checking and  128 byte packets.  It is slow
  3469.             but widely available.
  3470.                  All protocols return a boolean value        determining
  3471.             whether they were successful.  A  TRUE value means that all
  3472.             transfers were successful, while  a FALSE value means that
  3473.             the file (in the case of the Xmodem protocols) or one of the
  3474.             files (with Zmodem) failed to transfer correctly.        The
  3475.             protocol  is operator-abortable by pressing ESCape on the
  3476.             local keyboard.
  3477.  
  3478.             Sample Program            Sample Program            Sample Program
  3479.  
  3480.                  Success := SendXmodem(Filename);
  3481.                  if (not Success) then ComWriteLn('Transfer failed.')
  3482.                  else ComWriteLn('Transfer successful.');
  3483.  
  3484.             See Also:            See Also:            See Also: ReceiveXmodem.
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.                               BBSkit Manual      Page 58
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.                                                            SetAnswerMode
  3520.  
  3521.             PROCEDURE TBBS.SetAnswerMode(Status : Byte);            PROCEDURE TBBS.SetAnswerMode(Status : Byte);            PROCEDURE TBBS.SetAnswerMode(Status : Byte);
  3522.  
  3523.                  SetAnswer mode will set the answer  mode for the method
  3524.             PickupPhone.  To avoid confusion, you should use         the
  3525.             constants Originate                      Originate                      Originate  and  Answer                                      Answer                                      Answer  which  are provided with
  3526.             BBSkit.  Although SetAnswerMode will accept    other values,
  3527.             the results are unpredictable.
  3528.                  Originate                 Originate                 Originate mode causes PickupPhone to send ATD out   the
  3529.             serial port when it is called.  Answer                                            Answer                                            Answer mode causes an ATA to
  3530.             be sent.  In both cases, the phone is taken off-hook and   a
  3531.             carrier can then be waited for and acted upon.
  3532.  
  3533.             Sample Program            Sample Program            Sample Program
  3534.  
  3535.                  SetAnswerMode(Answer);
  3536.                  Repeat
  3537.                  Until (Ringing);
  3538.                  PickupPhone;
  3539.                  WaitFor('C', 30);
  3540.                  if (Online) then LogUser
  3541.                  else Recycle;
  3542.  
  3543.             See Also:            See Also:            See Also: GetAnswerMode.
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.                               BBSkit Manual      Page 59
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.                                                                   SetBps
  3581.  
  3582.             PROCEDURE TBBS.SetBps(Bps : Word);            PROCEDURE TBBS.SetBps(Bps : Word);            PROCEDURE TBBS.SetBps(Bps : Word);
  3583.  
  3584.                  SetBps sets the baud rate on the current serial port to
  3585.             Bps.   Legal values are 300, 600, 1200, 2400, 4800, 9600,
  3586.             19200, and 38400.  Other values  will not work because they
  3587.             are not supported by current FOSSIL specifications.
  3588.                  This method must be called before  any calls to GetBps,
  3589.             or BBSkit will not be able  to accurately identify the rate
  3590.             of a serial port.
  3591.  
  3592.             Sample Program            Sample Program            Sample Program
  3593.  
  3594.                  SetBps(2400);
  3595.                  if (not SendAT('ATZ')) then
  3596.                   begin
  3597.                     WriteLn('Modem not responding.');
  3598.                     Halt(1);
  3599.                   end
  3600.                  else
  3601.                     WaitForCall;
  3602.  
  3603.             See Also:            See Also:            See Also: GetBps.
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.                               BBSkit Manual      Page 60
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.                                                            SetCarrierChk
  3642.  
  3643.             PROCEDURE TBBS.SetCarrierChk(Status : Boolean);            PROCEDURE TBBS.SetCarrierChk(Status : Boolean);            PROCEDURE TBBS.SetCarrierChk(Status : Boolean);
  3644.  
  3645.                  This method sets the mode of carrier checking on    the
  3646.             current serial port during any wait-for-key            loops
  3647.             (ComReadKey, ComReadKeyE, ComReadLn, ComReadLnWrap).  If   a
  3648.             carrier is  lost while inside one of these loops, it will
  3649.             exit and allow the calling code to check for a lost carrier,
  3650.             and take whatever action  is necessary.  It is provided to
  3651.             keep users from being able to "crash" your BBS by hanging up
  3652.             on it.
  3653.  
  3654.             See Also:            See Also:            See Also: SetTime, SetTimeDelay.
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.                               BBSkit Manual      Page 61
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.                                                           SetCaptureFile
  3703.  
  3704.             PROCEDURE TBBS.SetCaptureFile(Path : ComStr);            PROCEDURE TBBS.SetCaptureFile(Path : ComStr);            PROCEDURE TBBS.SetCaptureFile(Path : ComStr);
  3705.  
  3706.                  SetCaptureFile determines where text will be sent when
  3707.             file capturing is turned on.  This allows you to      create
  3708.             files of entire user sessions, documenting  what they did at
  3709.             any point in their session.  It can also be used as        a
  3710.             capture buffer or "backscroll" feature for a        terminal
  3711.             program.
  3712.                  The default   file is SESSION.TXT, in the current
  3713.             directory.  Path can be any legal DOS   pathname, up to 127
  3714.             characters, including drive and subdirectory identifiers.
  3715.  
  3716.             Sample Program            Sample Program            Sample Program
  3717.  
  3718.                  SetCaptureFile('LEECH.TXT');
  3719.                  SetCaptureStatus(True);
  3720.                  ComWriteLn('Session recording has been turned on.');
  3721.  
  3722.             See Also:            See Also:            See Also: SetCaptureStatus, SetPrinter.
  3723.  
  3724.  
  3725.  
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.                               BBSkit Manual      Page 62
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.                                                         SetCaptureStatus
  3764.  
  3765.             PROCEDURE TBBS.SetCaptureStatus(Status : Boolean);            PROCEDURE TBBS.SetCaptureStatus(Status : Boolean);            PROCEDURE TBBS.SetCaptureStatus(Status : Boolean);
  3766.  
  3767.                  SetCaptureStatus turns on or  off session capturing to
  3768.             the file specified by SetCaptureFile, or to SESSION.TXT   if
  3769.             no call to SetCaptureFile is made.  All text transferred out
  3770.             through either ComWrite or ComWriteLn, as  well as all input
  3771.             made through the Comxxx calls, will  be copied to this file
  3772.             if Status is TRUE.  The file is closed and saved when Status
  3773.             is FALSE.
  3774.  
  3775.             See Also:            See Also:            See Also: SetCaptureFile, SetPrinter.
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.  
  3782.  
  3783.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790.  
  3791.  
  3792.  
  3793.  
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.                               BBSkit Manual      Page 63
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.                                                                  SetEcho
  3825.  
  3826.             PROCEDURE TBBS.SetEcho(Ch : Char);            PROCEDURE TBBS.SetEcho(Ch : Char);            PROCEDURE TBBS.SetEcho(Ch : Char);
  3827.  
  3828.                  SetEcho sets the character to be echoed when input from
  3829.             the modem is echoed back to  the modem (through ComReadKeyE,
  3830.             ComReadLn, or ComReadLnWrap).  It is useful for the input of
  3831.             passwords, but not much  else.  This echoing can be turned
  3832.             off by passing SetEcho a null value (#0).
  3833.  
  3834.             Sample Program            Sample Program            Sample Program
  3835.  
  3836.                  ComWrite('Enter password, stars echo: ');
  3837.                  SetEcho('*');
  3838.                  ComReadLn(Password, 10);
  3839.                  SetEcho(#0);  { turn echoing off }
  3840.  
  3841.  
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.                               BBSkit Manual      Page 64
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.                                                                 SetInput
  3886.  
  3887.             PROCEDURE TBBS.SetInput(Console, Remote : Boolean);            PROCEDURE TBBS.SetInput(Console, Remote : Boolean);            PROCEDURE TBBS.SetInput(Console, Remote : Boolean);
  3888.  
  3889.                  SetInput controls how input is accepted into the input
  3890.             routines (ComReadKey, ComReadKeyE, ComReadLn,            and
  3891.             ComReadLnWrap).  If Console is TRUE,    then input from the
  3892.             local keyboard will be  accepted.  If FALSE, input will be
  3893.             ignored.   If Remote is TRUE, then input from the current
  3894.             serial port will be accepted.  If FALSE, it will be ignored.
  3895.  
  3896.             Sample Program            Sample Program            Sample Program
  3897.  
  3898.                  SetInput(True, False);  { console only }
  3899.                  SetOutput(True, False);
  3900.                  ComWrite('New security level: ');
  3901.                  ComReadLn(Security, 5);  { let sysop input, user }
  3902.                                       { can't see it          }
  3903.                  SetInput(True, True);  { console and modem }
  3904.                  SetOutput(True, True);
  3905.  
  3906.             See Also:            See Also:            See Also: GetInput, GetOutput, SetOutput.
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.                               BBSkit Manual      Page 65
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.                                                               SetIntChar
  3947.  
  3948.             PROCEDURE TBBS.SetIntChar(Ch : Char);            PROCEDURE TBBS.SetIntChar(Ch : Char);            PROCEDURE TBBS.SetIntChar(Ch : Char);
  3949.  
  3950.                  SetIntChar defines what key will act as the interrupter
  3951.             for files when viewing a file through TypeFile.  If      the
  3952.             interrupt character is pressed,   the file is stopped and
  3953.             TypeFile returns to the calling code.
  3954.                  If Ch is null (#0), then the file cannot             be
  3955.             interrupted.  The default is a space (#32).
  3956.  
  3957.             See Also:            See Also:            See Also: SetPauseChar, TypeFile.
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.                               BBSkit Manual      Page 66
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.                                                                    SetLF
  4008.  
  4009.             PROCEDURE TBBS.SetLF(Status : Boolean);            PROCEDURE TBBS.SetLF(Status : Boolean);            PROCEDURE TBBS.SetLF(Status : Boolean);
  4010.  
  4011.                  SetLF controls the sending  of line feeds (#10) after
  4012.             carriage returns (#13).  This affects    both output to the
  4013.             modem and output to the local console.    When set to TRUE,
  4014.             every time a ComWriteLn(...) is executed,    a line feed is
  4015.             sent out as well.  When set to FALSE, no line feeds      are
  4016.             appending to carriage returns.
  4017.                  This is mainly used for output    to the main console,
  4018.             although some terminal emulations need it as well.
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.                               BBSkit Manual      Page 67
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.                                                                 SetNulls
  4069.  
  4070.             PROCEDURE TBBS.SetNulls(Nulls : Byte);            PROCEDURE TBBS.SetNulls(Nulls : Byte);            PROCEDURE TBBS.SetNulls(Nulls : Byte);
  4071.  
  4072.                  SetNulls determines how many nulls to send after   each
  4073.             carriage return.  Some   older terminals require a slight
  4074.             pause between lines, and  nulls are the only non-printing,
  4075.             non-command character these terminals can           process.
  4076.             Therefore, setting nulls to 4 or 5 can  give older terminals
  4077.             the time they need to "catch up" with the transmission.   If
  4078.             nulls are needed and not used, the first few characters from
  4079.             each line are usually lost.
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.                               BBSkit Manual      Page 68
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.                                                                SetOutput
  4130.  
  4131.             PROCEDURE TBBS.SetOutput(Console, Remote : Boolean);            PROCEDURE TBBS.SetOutput(Console, Remote : Boolean);            PROCEDURE TBBS.SetOutput(Console, Remote : Boolean);
  4132.  
  4133.                  SetOutput controls output redirection from ComWrite and
  4134.             ComWriteLn.  If  Console is TRUE, output from these methods
  4135.             is sent out to the screen.  If FALSE, no output is seen at
  4136.             the local terminal.  If Remote is TRUE,   output is sent to
  4137.             the serial port.  If FALSE, no output is seen at the  remote
  4138.             terminal.
  4139.  
  4140.             See Also:            See Also:            See Also: GetInput, GetOutput, SetInput.
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.                               BBSkit Manual      Page 69
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.                                                                SetPaging
  4191.  
  4192.             PROCEDURE TBBS.SetPaging(Status : Boolean);            PROCEDURE TBBS.SetPaging(Status : Boolean);            PROCEDURE TBBS.SetPaging(Status : Boolean);
  4193.  
  4194.                  SetPaging controls the pause at the end of each page of
  4195.             text.  If Status is set to TRUE, every page of text will end
  4196.             with a (more...) prompt, and a pause   for a keypress.  If
  4197.             Status is FALSE, text scrolls by without any pauses.
  4198.                  The length   of a screen can be set by a call to
  4199.             SetPagingLines.  The message  sent at the end of each page
  4200.             can be set by a call to SetPagingMsg.  The  internal counter
  4201.             which determines  when a page of text has been reached is
  4202.             reset each time the    user pressed a key and after the
  4203.             keypress following the (more...) prompt.
  4204.  
  4205.             Sample Program            Sample Program            Sample Program
  4206.  
  4207.                  SetPaging(True);
  4208.                  SetPagingLines(24);
  4209.                  SetPagingMsg('(more...)');
  4210.                  TypeFile('READ.ME');
  4211.  
  4212.             See Also:            See Also:            See Also: SetPagingLines, SetPagingMsg.
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.                               BBSkit Manual      Page 70
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.                                                           SetPagingLines
  4252.  
  4253.             PROCEDURE TBBS.SetPagingLines(Num : Byte);            PROCEDURE TBBS.SetPagingLines(Num : Byte);            PROCEDURE TBBS.SetPagingLines(Num : Byte);
  4254.  
  4255.                  SetPagingLines determines how long the screen    is for
  4256.             screen pausing.  The default is 24.  Pausing   is not turned
  4257.             on until a call to SetPaging is made.
  4258.  
  4259.             See Also:            See Also:            See Also: SetPaging, SetPagingMsg.
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.                               BBSkit Manual      Page 71
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.                                                             SetPagingMsg
  4313.  
  4314.             PROCEDURE TBBS.SetPagingMsg(Msg : String);            PROCEDURE TBBS.SetPagingMsg(Msg : String);            PROCEDURE TBBS.SetPagingMsg(Msg : String);
  4315.  
  4316.                  This method allows the programmer to customize the way
  4317.             a user is told a page of test has been reached.  Note that
  4318.             the page pausing   routine currently implemented does not
  4319.             allow  for "Continue? Yes/No/Continuous" type prompts,
  4320.             because a keypress is not processed at the end of a page  of
  4321.             text.  Therefore, this prompt should just convey the    idea
  4322.             that the user must press a key to continue viewing  the text
  4323.             on his screen.
  4324.  
  4325.             See Also:            See Also:            See Also: SetPaging, SetPagingLines.
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.                               BBSkit Manual      Page 72
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.                                                             SetPauseChar
  4374.  
  4375.             PROCEDURE TBBS.SetPauseChar(Ch : Char);            PROCEDURE TBBS.SetPauseChar(Ch : Char);            PROCEDURE TBBS.SetPauseChar(Ch : Char);
  4376.  
  4377.                  SetPauseChar determines what character will stop output
  4378.             when typing a file using TypeFile.  It is an  alternative to
  4379.             various types of flow    control since FOSSIL based flow
  4380.             control does not allow BBSkit to  do any inactivity checking
  4381.             while waiting for a key.  SetPauseChar can be   of any case.
  4382.             The check   for a pause key being pressed is not case
  4383.             sensitive.
  4384.                  The default is P.  Once the file has   been paused, any
  4385.             key will restart it.
  4386.  
  4387.             See Also:            See Also:            See Also: SetIntChar, TypeFile.
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.                               BBSkit Manual      Page 73
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.                                                                  SetPort
  4435.  
  4436.             PROCEDURE TBBS.SetPort(Comport : Byte);            PROCEDURE TBBS.SetPort(Comport : Byte);            PROCEDURE TBBS.SetPort(Comport : Byte);
  4437.  
  4438.                  Sets the current COM port to  Comport.  This is useful
  4439.             for setting the comport in applications where the     FOSSIL
  4440.             driver should already  be initialized, such as in doors and
  4441.             other external programs used by a BBS.
  4442.                  Comport must be in the range of 1   - 4, inclusive, or
  4443.             the call is ignored.
  4444.  
  4445.             See Also:            See Also:            See Also: OpenPort.
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.                               BBSkit Manual      Page 74
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.                                                               SetPrinter
  4496.  
  4497.             PROCEDURE TBBS.SetPrinter(Status : Boolean);            PROCEDURE TBBS.SetPrinter(Status : Boolean);            PROCEDURE TBBS.SetPrinter(Status : Boolean);
  4498.  
  4499.                  SetPrinter controls the status of printer dumping of a
  4500.             session in progress.     The printer to be used must be
  4501.             accessible through Pascal's Lst pseudo-file, which     sends
  4502.             data to the printer.     The "Printer" unit need not be
  4503.             included in your program, but it      must be available at
  4504.             compile-time.
  4505.                  If Status is set to TRUE, all text output       through
  4506.             ComWrite and ComWriteLn will be sent to the printer, and all
  4507.             input from the ComReadKey, ComReadKeyE, ComReadLn,       and
  4508.             ComReadLnWrap calls will also be sent to the printer.
  4509.  
  4510.             See Also:            See Also:            See Also: SetCaptureFile, SetCaptureStatus.
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.                               BBSkit Manual      Page 75
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.                                                                 SetTimer
  4557.  
  4558.             PROCEDURE TBBS.SetTimer(Status : Boolean);            PROCEDURE TBBS.SetTimer(Status : Boolean);            PROCEDURE TBBS.SetTimer(Status : Boolean);
  4559.  
  4560.                  This method controls monitoring of user     inactivity.
  4561.             When Status is TRUE, and the    user has been idle for the
  4562.             amount of time specified by SetTimerDelay, BBSkit will send
  4563.             a short message to  the user, telling him of the impending
  4564.             logoff.  If 30 additional seconds pass, and the user has not
  4565.             pressed a key, the input routine  will be cancelled and the
  4566.             CarrierLost function will  act as if carrier had been lost.
  4567.             Your code should check  CarrierLost and act as if the user
  4568.             had hung up on instead of trying to determine whether or not
  4569.             carrier was actually lost.
  4570.  
  4571.             See Also:            See Also:            See Also: CarrierLost, SetTimerDelay.
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.                               BBSkit Manual      Page 76
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.                                                            SetTimerDelay
  4618.  
  4619.             PROCEDURE TBBS.SetTimerDelay(Dly : Word);            PROCEDURE TBBS.SetTimerDelay(Dly : Word);            PROCEDURE TBBS.SetTimerDelay(Dly : Word);
  4620.  
  4621.                  This method specifies the time interval,    in seconds,
  4622.             before BBSkit should treat the situation  as a carrier loss.
  4623.             Inactivity checking is turned on and off through         the
  4624.             SetTimer method.
  4625.  
  4626.             See Also:            See Also:            See Also: SetTimer.
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.                               BBSkit Manual      Page 77
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.                                                               ShowCursor
  4679.  
  4680.             PROCEDURE ShowCursor;            PROCEDURE ShowCursor;            PROCEDURE ShowCursor;
  4681.  
  4682.                  ShowCursor turns the local screen text cursor on after
  4683.             it was previously turned off with the HideCursor procedure.
  4684.  
  4685.             See Also:            See Also:            See Also: HideCursor.
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.                               BBSkit Manual      Page 78
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.                                                                    Space
  4740.  
  4741.             FUNCTION Space(Num : Byte) : String;            FUNCTION Space(Num : Byte) : String;            FUNCTION Space(Num : Byte) : String;
  4742.  
  4743.                  Space returns a string consisting of Num spaces.  It is
  4744.             mainly used for aligning text out from the left side  of the
  4745.             screen, without having to  insert literal spaces into your
  4746.             code.
  4747.  
  4748.             See Also:            See Also:            See Also: Center, Left, Replicate, Right.
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.                               BBSkit Manual      Page 79
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.                                                                 StrToInt
  4801.  
  4802.             FUNCTION StrToInt(Strn : String) : LongInt;            FUNCTION StrToInt(Strn : String) : LongInt;            FUNCTION StrToInt(Strn : String) : LongInt;
  4803.  
  4804.                  StrToInt converts the string  Strn into the equivalent
  4805.             long integer and returns   it as a function.  It is the
  4806.             procedure Val in function form, like    it should have been
  4807.             from the beginning.
  4808.                  ComReadLn and ComReadLnWrap cannot handle input of non-
  4809.             string types, so any numbers entered from these   procedures
  4810.             must first be converted into an  integer-type to be used by
  4811.             the programmer.
  4812.  
  4813.             Sample Program            Sample Program            Sample Program
  4814.  
  4815.                  ComWrite('Lines per page: ');
  4816.                  ComReadLn(Inp, 3);
  4817.                  Lines := StrToInt(Inp);
  4818.  
  4819.             See Also:            See Also:            See Also: IntToStr.
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.                               BBSkit Manual      Page 80
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.                                                                    SwapB
  4862.  
  4863.             PROCEDURE SwapB(var A : Byte);            PROCEDURE SwapB(var A : Byte);            PROCEDURE SwapB(var A : Byte);
  4864.  
  4865.                  SwapB will swap the high and low order hex digits  of a
  4866.             byte.  It is  useful for reversing the text attributes and
  4867.             swapping the foreground and background colors.  It     isn't
  4868.             useful for much else, however.  (At least, nothing       the
  4869.             author can think of right now.)
  4870.  
  4871.             Sample Program            Sample Program            Sample Program
  4872.  
  4873.                  Temp := $12;
  4874.                  SwapB(Temp);
  4875.  
  4876.             Sample Watch            Sample Watch            Sample Watch
  4877.  
  4878.                  Temp,h : $21
  4879.  
  4880.                  If you want to send hex numbers to the screen, you will
  4881.             have to write your own function or procedure      to do so.
  4882.             Turbo Pascal doesn't include one.  However, using a watch is
  4883.             sufficient for this sample.
  4884.  
  4885.             See Also:            See Also:            See Also: SYSTEM.Swap.
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.                               BBSkit Manual      Page 81
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.                                                             TerminalMode
  4923.  
  4924.             FUNCTION TBBS.TerminalMode(Duplex : Byte) : Char;            FUNCTION TBBS.TerminalMode(Duplex : Byte) : Char;            FUNCTION TBBS.TerminalMode(Duplex : Byte) : Char;
  4925.  
  4926.                  TerminalMode provides the closest contact with      the
  4927.             modem that BBSkit provides a user.   Duplex contains one of
  4928.             two values, which  are represented by constants.  If Duplex
  4929.             is Full               Full               Full,  then no character typed at the local console is
  4930.             sent to the screen.  If Duplex is     Half                                                  Half                                                  Half, every  character
  4931.             typed at the keyboard will also appear at the   screen.  All
  4932.             characters typed are sent out the serial port, and       any
  4933.             characters coming through the serial port will appear on the
  4934.             local screen.
  4935.                  TerminalMode exits when one of the extended keycodes is
  4936.             detected by Pascal.  These include the Alt- keys,       some
  4937.             Control- keys, function keys, and others.  For a    complete
  4938.             list, and the codes that go with each key, check your Pascal
  4939.             manuals under "Extended Key Codes."
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.                               BBSkit Manual      Page 82
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.                                                              TextMemSize
  4984.  
  4985.             FUNCTION TextMemSize(X1, Y1, X2, Y2 : Byte) : Word;            FUNCTION TextMemSize(X1, Y1, X2, Y2 : Byte) : Word;            FUNCTION TextMemSize(X1, Y1, X2, Y2 : Byte) : Word;
  4986.  
  4987.                  TextMemSize returns the amount of memory required for a
  4988.             GetText call using   the coordinates X1,Y1 to X2,Y2.  All
  4989.             coordinates are absolute screen coordinates, not relative to
  4990.             the current window.
  4991.                  The memory required for a GetText call is  equal to the
  4992.             width of the box * 2, multiplied by the height of the   box,
  4993.             plus 2.  Each character on-screen  requires two bytes.  The
  4994.             first is the    actual character, and the second is the
  4995.             attribute byte.  The  attribute byte determines what color
  4996.             the character is, its background, and if the       character
  4997.             blinks.  Two more bytes are required for PutText to know how
  4998.             large the text is that it is placing on-screen.
  4999.  
  5000.             See Also:            See Also:            See Also: GetText, PutText.
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.                               BBSkit Manual      Page 83
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.                                                                     Time
  5045.  
  5046.             FUNCTION Time : String;            FUNCTION Time : String;            FUNCTION Time : String;
  5047.  
  5048.                  Time returns the current time from the internal   clock
  5049.             (if any) or from DOS (if there is no clock) and formats into
  5050.             the form HH:MM[a/p].  Therefore, 12:00 noon would         be
  5051.             returned as 12:00p, and 8 in  the morning would be returned
  5052.             as  8:00a.  (There is a leading space for times when     the
  5053.             hour only takes up one digit.)    The length of the string
  5054.             returned by Time is always                                always                                always 6 characters.
  5055.  
  5056.             See Also:            See Also:            See Also: Date.
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.                               BBSkit Manual      Page 84
  5100.  
  5101.  
  5102.  
  5103.  
  5104.  
  5105.                                                                 TypeFile
  5106.  
  5107.             PROCEDURE TBBS.TypeFile(Fname : String);            PROCEDURE TBBS.TypeFile(Fname : String);            PROCEDURE TBBS.TypeFile(Fname : String);
  5108.  
  5109.                  TypeFile acts exactly like the DOS equivalent, but also
  5110.             sends text to the serial port    and/or screen depending on
  5111.             SetOutput.
  5112.                  The file can     be paused if the key defined by
  5113.             SetPauseChar is pressed,  and stopped if the key defined by
  5114.             SetIntChar is pressed.
  5115.  
  5116.             See Also:            See Also:            See Also: SetIntChar, SetPauseChar.
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.                               BBSkit Manual      Page 85
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.                                                                    Upper
  5167.  
  5168.             FUNCTION Upper(Strn : String) : String;            FUNCTION Upper(Strn : String) : String;            FUNCTION Upper(Strn : String) : String;
  5169.  
  5170.                  Upper will make Strn consist completely    of uppercase
  5171.             characters.  Characters not in the    range of 'a'..'z' are
  5172.             unaffected.
  5173.  
  5174.             Sample Program            Sample Program            Sample Program
  5175.  
  5176.                  WriteLn(Upper('BBSkit'));
  5177.  
  5178.             Sample Run            Sample Run            Sample Run
  5179.  
  5180.                  BBSKIT
  5181.  
  5182.             See Also:            See Also:            See Also: Lower.
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.                               BBSkit Manual      Page 86
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.                                                                VersionID
  5228.  
  5229.             FUNCTION VersionID : String;            FUNCTION VersionID : String;            FUNCTION VersionID : String;
  5230.  
  5231.                  Returns a string reporting the version of BBSkit,   who
  5232.             wrote it, the release date, and whether it  is registered or
  5233.             unregistered.
  5234.                  This function was  added instead of using a title line
  5235.             at the  beginning of each program that used BBSkit.  Your
  5236.             programs can now   also report the version of BBSkit used
  5237.             without anything more  complex than a recompile for a newer
  5238.             version.
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.                               BBSkit Manual      Page 87
  5283.  
  5284.  
  5285.  
  5286.  
  5287.  
  5288.                                                                  WaitFor
  5289.  
  5290.             FUNCTION TBBS.WaitFor(Strn : String; Timeout             FUNCTION TBBS.WaitFor(Strn : String; Timeout             FUNCTION TBBS.WaitFor(Strn : String; Timeout     : Word) :                                                             : Word) :                                                             : Word) :
  5291.             Boolean;            Boolean;            Boolean;
  5292.  
  5293.                  WaitFor will wait  for Strn to come through the serial
  5294.             port in Timeout seconds or less.    If the string is seen,
  5295.             WaitFor returns a TRUE value.  Otherwise, it returns FALSE.
  5296.                  WaitFor is not case sensitive,          and does no
  5297.             differentiate between whole words and partial         words.
  5298.             Therefore, WaitFor would return  TRUE while waiting for an
  5299.             "e" if the following string came through the serial port:
  5300.  
  5301.             BBSkit is neat!
  5302.  
  5303.                  This method does make use of the serial port's    input
  5304.             buffer, though, so all  characters up to the "a" in "neat"
  5305.             would be lost.  The only characters remaining  in the buffer
  5306.             after that call would be "at!".
  5307.                  WaitFor is primarily used for checking to see if    the
  5308.             modem received a   sent command.  The method   SendAT                                                           SendAT                                                           SendAT calls
  5309.             WaitFor after sending a command out the serial port, and has
  5310.             it wait two seconds for an "OK" string to be sent back.
  5311.                  WaitFor can also be used to find out what baud a caller
  5312.             has connected at:
  5313.  
  5314.             Sample Program            Sample Program            Sample Program
  5315.  
  5316.                  if (WaitFor('CONNECT', 30)) then
  5317.                   begin
  5318.                     ComReadLn(Result, 40);  { read in result code }
  5319.                     Bps := IntToStr(Copy(Result, 2, 5));
  5320.                     if (Bps = 0) then Bps := 300;
  5321.                     SetBps(Bps);
  5322.                   end;
  5323.  
  5324.                  This code works because a common connect string,   such
  5325.             as CONNECT 1200, would be seen.  " 1200" would remain in the
  5326.             input buffer, so the programmer would turn all     character
  5327.             past the leading space into a number, and use that number to
  5328.             set the bit rate.  If that number were 0, it would mean that
  5329.             there was no text following the CONNECT, so you must      be
  5330.             running at 300 baud.  Note that   some modems must be told
  5331.             specifically to send  the extended CONNECT codes if they do
  5332.             not do so as default.
  5333.  
  5334.             See Also:            See Also:            See Also: SendAT.
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.                               BBSkit Manual      Page 88
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.                                                                     XPos
  5350.  
  5351.             FUNCTION XPos(Strn, SubStrn : String; Offset : Byte) : Byte;            FUNCTION XPos(Strn, SubStrn : String; Offset : Byte) : Byte;            FUNCTION XPos(Strn, SubStrn : String; Offset : Byte) : Byte;
  5352.  
  5353.                  XPos returns the first occurance of SubStrn within Strn
  5354.             starting at Offset into Strn.  This function is an extension
  5355.             of the standard function Pos, which does not allow       for
  5356.             finding multiple occurances of the sub-string.
  5357.                  Please note that XPos makes a  more logical approach to
  5358.             searching a string for a sub-string, and the string       to
  5359.             search in comes first,  while the string to locate in that
  5360.             string comes second.    (Pos reverses it.  The sub-string
  5361.             comes before the string.)
  5362.                  The result of  this function is the absolute offset at
  5363.             which the sub-string starts within the string, or zero if no
  5364.             occurance was found.
  5365.  
  5366.             Sample Program            Sample Program            Sample Program
  5367.  
  5368.                  WriteLn(XPos('Hi! Hi!', 'Hi', 3));
  5369.  
  5370.             Sample Run            Sample Run            Sample Run
  5371.  
  5372.                  5
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.                               BBSkit Manual      Page 89